<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>递归</title>
</head>
<body>
    <script>
        function a(n){
            if (n===1){
                return 1;
            }else {
                return n*a(n-1);
            }
        }
        console.log(a(5));
    </script>
</body>
</html>